﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Intergr8.Data
{
    /// <summary>
    /// Describes an exception from within a Data operation
    /// </summary>
    public class DataProviderException : Exception
    {
        private string _module = "";

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="module"></param>
        /// <param name="msg"></param>
        public DataProviderException(string module, string msg)
            : base(msg)
        {
        }

        /// <summary>
        /// Construct from Exception
        /// </summary>
        /// <param name="module"></param>
        /// <param name="msg"></param>
        /// <param name="inner"></param>
        public DataProviderException(string module, string msg, Exception inner)
            : base(msg, inner)
        {
        }


        /// <summary>
        /// Module relating to Exception
        /// </summary>
        public string Module
        {
            get { return _module; }
            set { _module = value; }
        }




    }
}
